<%@ page language="java" session="true" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="../common/framework/header.jsp" />
<link href="${pageContext.request.contextPath}/static/plugin/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/css/ionicons.min.css" rel="stylesheet">
<style>
	body{
		font-size:12px;color:#333;font-family:微软雅黑;background-color: #fff;
	}
	.testPlan_right_title {
		padding:0 0 0 20px;
	}
	.testPlan_right_title>h4 {
		display:inline;
	}
	.testPlan_right_title>a {
		margin-top: 10px;color:#fff;
	}

	#syncDataDiv {
		padding-right:30px;
		padding-left:10px;
	}

	#syncDataDiv>.eq-no-panel {
		background-color: #fff;
	}
	#syncDataDiv .progress-xs {
		margin-bottom:0;
	}
	#syncDataForm>.panel-body {
		padding-top: 0;
	}
	.testPlan_right_title>div {
		display:inline;

	}
	.testPlan_right_title>div>select {
		width:20%!important;
	}
	.jiraOrCtsDiv0 {
		margin-left: 100px;
	}
	.jiraOrCtsDiv1 {
		margin-left: 15px;
	}
	.tab1-panel-body {
		padding:0px 0px 20px 0px;
	}
	.panel .label-height {
	    margin-bottom: 10px!important;
	}
	.lable-body {
		margin-bottom:10px!important;
		padding-left: 15px;
		padding-right: 15px;

	}
	.label-height>label,.lable-body>label,.lable-body>div {
		text-align: center!important;
	}
	#cts_sync_jira_tab1 {
		display:none;
	}
	#jira_priority_mapping,#cts_priority_mapping {
		margin-top: 20px;
		margin-right: 10px;
		width:48%;
		padding: 0
	}
	#jira_state_mapping,#cts_state_mapping {
		margin-top: 20px;
		padding: 0;
	}
	#demo-main-tab2 .panel-heading{
		height:46px;
	}

	#demo-main-tab2 .panel-body{
		padding:0px 0px 20px 0px;
	}
	#demo-main-tab2 select {
		width:35%;
	}
	#cts_sync_jira_tab2 {
		display:none;
	}


	#jira_sync_cts_tab3 .row {
		margin-top : 20px;
	}

	#jira_sync_cts_tab3 .row>div {
		margin-right: -8px;
	}
	#jira_sync_cts_tab3 .row>div>label {
		padding:6px 0 0 0;text-align:right;
	}
	#jira_sync_cts_tab3 .row>div>div {
		padding-right:0;
	}
	.jira_sync_cts_tab3_div0>label {
		width:51px;
	}
	.jira_sync_cts_tab3_div0>div {
		width: 144px;
	}
	#cts_sync_jira_tab3 {
		display:none;
	}
	.cts_sync_jira_tab3_row0 {
		margin-top : 20px;
	}
	#cts_sync_jira_tab3 .col-xs-3 {
		padding:6px 0 0 0;
		text-align:right;
	}
	#cts_sync_jira_tab3 .col-xs-9 {
		padding-right:0;
	}
	#jira_reset {
		margin-left: 10px;
	}
	#cts_reset {
		margin-left: 35px;
	}
	#syncDataForm  .panel-body {
		padding-bottom:20px;
	}
	.checkedAll {
		padding-left: 0;
		padding-right: 0;
	}
	.bootstrap-table .fixed-table-toolbar .bs-bars {
	    margin-top: 0px;
	    margin-bottom: 0px;
	}
</style>

	<div class="container-fluid" id="syncDataDiv">
		    <div class="col-md-12 eq-box-md eq-no-panel">
				<div id="demo-main-wz">
						<ul class="row wz-step wz-icon-bw wz-nav-off mar-top">
							<li class="col-xs-4">
								<a data-toggle="tab" href="#demo-main-tab1">
<!-- 									<span class="text-danger"><i class="demo-pli-information icon-2x"></i></span> -->
									<p class="text-semibold mar-no">选择同步字段</p>
								</a>
							</li>
							<li class="col-xs-4">
								<a data-toggle="tab" href="#demo-main-tab2">
<!-- 									<span class="text-warning"><i class="demo-pli-male icon-2x"></i></span> -->
									<p class="text-semibold mar-no">选择映射值</p>
								</a>
							</li>
							<li class="col-xs-4">
								<a data-toggle="tab" href="#demo-main-tab3">
<!-- 									<span class="text-info"><i class="demo-pli-home icon-2x"></i></span> -->
									<p class="text-semibold mar-no">选择同步数据</p>
								</a>
							</li>
						</ul>

						<div class="progress progress-xs">
							<div class="progress-bar progress-bar-primary"></div>
						</div>

						<form class="form-horizontal" id="syncDataForm">
							<div class="panel-body">
								<div class="tab-content">
									<div id="demo-main-tab1" class="tab-pane">
										<div class ="panel-title testPlan_right_title form-inline">
											<h4>jira 同步 cts</h4>
											<div class="jiraOrCtsDiv0">
													<select class="form-control" id="jiraOrCts_project0" name="jiraOrCts_project0">
<!-- 														<option value="">jira全部</option> -->
<!-- 														<option value="0">jira项目1</option> -->
<!-- 														<option value="1">jira项目2</option> -->
<!-- 														<option value="2">jira项目3</option> -->
													</select>
						 					</div>
							 				<span><i class="ion-arrow-right-a"></i></span>
							 				<div class="jiraOrCtsDiv1">
	<!-- 					 						<label class="control-label width-auto" >cts项目:</label> -->
													<select class="form-control" id="jiraOrCts_project1" name="jiraOrCts_project1">
<!-- 														<option value="">cts全部</option> -->
<!-- 														<option value="0">cts项目1</option> -->
<!-- 														<option value="1">cts项目2</option> -->
<!-- 														<option value="2">cts项目3</option> -->
													</select>
						 					</div>
											<a class="btn btn-primary pull-right" onclick="syncData.changeSync()">
												切换同步
											</a>
										</div>

										<div class="panel">
											<div class="panel-body tab1-panel-body">
												<div id="jira_sync_cts_tab1">
														<div class = "form-group label-height">
															<label class="col-sm-1 col-sm-offset-2 control-label">jira字段</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">cts字段</label>
															<div class=" col-sm-2 col-sm-offset-2 checkbox display-inline checkedAll">
									                            <input id="jira_checkedAll" class="magic-checkbox" type="checkbox" onclick="syncData.checkAll();">
									                            <label for="jira_checkedAll">全部同步</label>
									                        </div>
<!-- 															<label class="col-sm-2 col-sm-offset-2 control-label">是否全部同步</label> -->
														</div>
<!-- 														project/name/author/module/summary/priority/assigner/iteration/state/attachment/step -->
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">主题</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">名称</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-name" name="jira_param" class="magic-checkbox" type="checkbox" checked disabled>
									                            <label for="jira-name"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">报告人</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">创建人</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-author" name="jira_param" class="magic-checkbox" type="checkbox" checked disabled>
									                            <label for="jira-author"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">模块</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">模块</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-module" name="jira_param" class="magic-checkbox" type="checkbox" >
									                            <label for="jira-module"></label>
									                        </div>
														</div>


														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">描述</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">摘要</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-summary" name="jira_param" class="magic-checkbox" type="checkbox" >
									                            <label for="jira-summary"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">优先级</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">优先级别</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-priority" name="jira_param" class="magic-checkbox" type="checkbox">
									                            <label for="jira-priority"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">经办人</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">指派人</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-assigner" name="jira_param" class="magic-checkbox" type="checkbox">
									                            <label for="jira-assigner"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">迭代</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">迭代</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-iteration" name="jira_param" class="magic-checkbox" type="checkbox" >
									                            <label for="jira-iteration"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">状态</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">状态</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-state" name="jira_param" class="magic-checkbox" type="checkbox">
									                            <label for="jira-state"></label>
									                        </div>
														</div>
<!-- 														<div class ="form-group lable-body"> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">附件</label> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">附件</label> -->
<!-- 															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline"> -->
<!-- 									                            <input id="form-checkbox-9" name="jira_param" class="magic-checkbox" type="checkbox"> -->
<!-- 									                            <label for="form-checkbox-9"></label> -->
<!-- 									                        </div> -->
<!-- 														</div> -->
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">测试详细信息</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">步骤</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="jira-step" name="jira_param" class="magic-checkbox" type="checkbox">
									                            <label for="jira-step"></label>
									                        </div>
														</div>


												</div>


												<div id="cts_sync_jira_tab1">
														<div class = "form-group label-height">
															<label class="col-sm-1 col-sm-offset-2 control-label">cts字段</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">jira字段</label>
															<div class=" col-sm-2 col-sm-offset-2 checkbox display-inline checkedAll">
									                            <input id="cts_checkedAll" class="magic-checkbox" type="checkbox" onclick="syncData.checkAll();">
									                            <label for="cts_checkedAll">全部同步</label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">名称</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">主题</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="name" name="cts_param" class="magic-checkbox" type="checkbox" checked disabled>
									                            <label for="name"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">创建人</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">报告人</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="author" name="cts_param" class="magic-checkbox" type="checkbox" checked disabled>
									                            <label for="author"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">模块</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">模块</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="module" name="cts_param" class="magic-checkbox" type="checkbox" >
									                            <label for="module"></label>
									                        </div>
														</div>


														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">摘要</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">描述</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="summary" name="cts_param" class="magic-checkbox" type="checkbox" >
									                            <label for="summary"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">优先级别</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">优先级</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="priority" name="cts_param" class="magic-checkbox" type="checkbox">
									                            <label for="priority"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">指派人</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">经办人</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="assigner" name="cts_param" class="magic-checkbox" type="checkbox">
									                            <label for="assigner"></label>
									                        </div>
														</div>
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">迭代</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">迭代</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="iteration" name="cts_param" class="magic-checkbox" type="checkbox" >
									                            <label for="iteration"></label>
									                        </div>
														</div>
<!-- 														<div class ="form-group lable-body"> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">状态</label> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">状态</label> -->
<!-- 															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline"> -->
<!-- 									                            <input id="state" name="cts_param" class="magic-checkbox" type="checkbox"> -->
<!-- 									                            <label for="state"></label> -->
<!-- 									                        </div> -->
<!-- 														</div> -->
<!-- 														<div class ="form-group lable-body"> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">附件</label> -->
<!-- 															<label class="col-sm-1 col-sm-offset-2 control-label">附件</label> -->
<!-- 															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline"> -->
<!-- 									                            <input id="form-checkbox-9" name="cts_param" class="magic-checkbox" type="checkbox"> -->
<!-- 									                            <label for="form-checkbox-9"></label> -->
<!-- 									                        </div> -->
<!-- 														</div> -->
														<div class ="form-group lable-body">
															<label class="col-sm-1 col-sm-offset-2 control-label">步骤</label>
															<label class="col-sm-1 col-sm-offset-2 control-label">测试详细信息</label>
															<div class=" col-sm-1 col-sm-offset-2 checkbox display-inline">
									                            <input id="step" name="cts_param" class="magic-checkbox" type="checkbox">
									                            <label for="step"></label>
									                        </div>
														</div>


												</div>

											</div>
										</div>
									</div>

									<div id="demo-main-tab2" class="tab-pane fade">
										<div id="jira_sync_cts_tab2" class="row">
											<div class="panel col-sm-6" id="jira_priority_mapping">
												<div class="panel-heading">
										 			<div class ="panel-title mainpanel panel-subtitile">优先级</div>
										 		</div>
												<div class="panel-body">
<!-- 					                                 <div class = "form-group label-height"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">jira1111</label> -->
<!-- 														<label class="col-sm-2 col-sm-offset-4 control-label">cts</label> -->
<!-- 													</div> -->
<!-- 													<div class ="form-group lable-body"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">HIghest11111</label> -->
<!-- 														<label class="col-sm-1 col-sm-offset-1 control-label">→</label> -->
<!-- 														<select class="col-sm-3 col-sm-offset-1 form-control" id="" name=""> -->
<!-- 															<option value="">1</option> -->
<!-- 															<option value="0">2</option> -->
<!-- 															<option value="1">3</option> -->
<!-- 															<option value="2">4</option> -->
<!-- 														</select> -->
<!-- 													</div> -->




												</div>
											</div>

											<div class="panel col-sm-6" id="jira_state_mapping">
												<div class="panel-heading">
										 			<div class ="panel-title mainpanel panel-subtitile">状态</div>
										 		</div>
												<div class="panel-body">
<!-- 					                                  <div class = "form-group label-height"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">jira</label> -->
<!-- 														<label class="col-sm-2 col-sm-offset-4 control-label">cts</label> -->
<!-- 													</div> -->
<!-- 													<div class ="form-group lable-body" > -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">新建1111</label> -->
<!-- 														<label class="col-sm-1 col-sm-offset-1 control-label">→</label> -->
<!-- 														<select class="col-sm-3 col-sm-offset-1 form-control" id="jiraOrCts_project0" name="jiraOrCts_project0" > -->
<!-- 															<option value="">就绪</option> -->
<!-- 															<option value="0">设计</option> -->
<!-- 															<option value="1">已关闭</option> -->
<!-- 														</select> -->
<!-- 													</div> -->



												</div>
											</div>
										</div>


										<div id="cts_sync_jira_tab2" class="row">
											<div class="panel col-sm-12" id="cts_priority_mapping" style="width:100%;">
												<div class="panel-heading">
										 			<div class ="panel-title mainpanel panel-subtitile">优先级</div>
										 		</div>
												<div class="panel-body">
					                                 <div class = "form-group label-height">
														<label class="col-sm-2 col-sm-offset-2 control-label">cts1111</label>
														<label class="col-sm-2 col-sm-offset-4 control-label">jira</label>
													</div>
<!-- 													<div class ="form-group lable-body"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">11111</label> -->
<!-- 														<label class="col-sm-1 col-sm-offset-1 control-label">→</label> -->
<!-- 														<select class="col-sm-3 col-sm-offset-1 form-control" id="jiraOrCts_project0" name="jiraOrCts_project0"> -->
<!-- 															<option value="">HIghest</option> -->
<!-- 															<option value="0">High</option> -->
<!-- 															<option value="1">Medium</option> -->
<!-- 															<option value="2">Low</option> -->
<!-- 															<option value="2">Lowest</option> -->
<!-- 														</select> -->
<!-- 													</div> -->

												</div>
											</div>

<!-- 											<div class="panel col-sm-6" id="cts_state_mapping"> -->
<!-- 												<div class="panel-heading"> -->
<!-- 										 			<div class ="panel-title mainpanel panel-subtitile">状态</div>	 -->
<!-- 										 		</div> -->
<!-- 												<div class="panel-body"> -->
<!-- 					                                  <div class = "form-group label-height"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">cts1111</label> -->
<!-- 														<label class="col-sm-2 col-sm-offset-4 control-label">jira</label> -->
<!-- 													</div> -->
<!-- 													<div class ="form-group lable-body"> -->
<!-- 														<label class="col-sm-2 col-sm-offset-2 control-label">就绪1111</label> -->
<!-- 														<label class="col-sm-1 col-sm-offset-1 control-label">→</label> -->
<!-- 														<select class="col-sm-3 col-sm-offset-1 form-control" id="jiraOrCts_project0" name="jiraOrCts_project0"> -->
<!-- 															<option value="">新建</option> -->
<!-- 															<option value="0">进行中</option> -->
<!-- 															<option value="1">关闭</option> -->
<!-- 														</select> -->
<!-- 													</div> -->

<!-- 												</div> -->
<!-- 											</div> -->
										</div>


									</div>

									<div id="demo-main-tab3" class="tab-pane">
										<div id="jira_sync_cts_tab3">
												<div class = "row">
										         	<div class="form-group col-sm-3 col-xs-3 jira_sync_cts_tab3_div0" style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">测试循环:</label>
										            	<div class="col-xs-9">
															<select class="col-sm-3 col-sm-offset-1 form-control" id="cycleId" name="cycleId" onchange="syncData.cycleIdChange();">
															</select>
														</div>
										         	</div>
										         	<div class = "form-group col-sm-3 col-xs-3" style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">模块:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="componentId" name="componentId" onchange="syncData.componentIdChange();">
										                     </select>
														</div>
													</div>
													<div class="form-group col-sm-3 col-xs-3" style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">结果:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="issueStatus" name="issueStatus" onchange="syncData.issueStatusChange();">
										                     </select>
														</div>
										         	</div>
										         	<div class = "form-group col-sm-3 col-xs-3" style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">报告人:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="reporter" name="reporter" onchange="syncData.reporterChange();">
										                     </select>
														</div>
													</div>
													<a id = "jira_reset" class = "btn btn-gray" onclick="syncData.jira_reset();"><i class="glyphicon glyphicon-share-alt"></i> 重置</a>
												</div>
												<div class="panel-body pad-top-no">
													<div id="toolbar">
															<div class="checkbox">
									                            <input id="jira_table_checkedAll" class="magic-checkbox" type="checkbox">
									                            <label for="jira_table_checkedAll">选中当前全部数据，共<span id="jira-total-num"></span>条记录</label>
									                        </div>
	<!-- 													<form id="search_form" class="form-inline"> -->
	<!-- 														&nbsp;111 -->
	<!-- 													</form> -->
													</div>


													<table id="jira_sync_cts_table" class="table" data-toolbar="#toolbar" >
				                                      <thead>
												        <tr>
												            <th data-field="" data-checkbox="true"></th>
												            <th data-field="status">结果</th>
												            <th data-field="issueKey" >key</th>
												            <th data-field="summary" >标题</th>
												            <th data-field="cycleList" data-formatter="cycleListFormatter">测试循环</th>
												            <th data-field="componentList" data-formatter="componentListFormatter">模块</th>
												            <th data-field="reporter" >报告人</th>
												            <th data-field="assignee" >经办人</th>
												            <th data-field="createTime" >创建时间</th>
												        </tr>
												    </thead>
				                                  </table>
			                                  </div>
										</div>

										<div id="cts_sync_jira_tab3">
												<div class = "row cts_sync_jira_tab3_row0">
										         	<div class="form-group col-sm-4 col-xs-4">
										            	<label class="col-xs-3">状态:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="state" name="state" onchange="syncData.stateChange();">
															</select>
														</div>
										         	</div>
										         	<div class = "form-group col-sm-4 col-xs-4">
										            	<label class="col-xs-3">迭代:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="iterationId" name="iterationId" onchange="syncData.iterationIdChange();">
										                     </select>
														</div>
													</div>
													<div class="form-group col-sm-4 col-xs-4">
										            	<label class="col-xs-3">区域:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="areaId" name="areaId" onchange="syncData.areaIdChange();">
										                     </select>
														</div>
										         	</div>
												</div>
												<div class = "row" >
													<div class="form-group col-sm-4 col-xs-4" style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">创建人:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="authorId" name="authorId" onchange="syncData.authorIdChange();">
										                     </select>
														</div>
										         	</div>
										         	<div class = "form-group col-sm-4 col-xs-4"style="margin-bottom: 0!important;">
										            	<label class="col-xs-3">指派人:</label>
										            	<div class="col-xs-9">
															<select class="form-control" data-width="100%" id="assignId" name="assignId" onchange="syncData.assignIdChange();">
										                     </select>
														</div>
													</div>
													<a id = "cts_reset" class = "btn btn-gray" onclick="syncData.cts_reset();"><i class="glyphicon glyphicon-share-alt"></i> 重置</a>
												</div>



												<div class="panel-body pad-top-no">
													<div id="toolbar">
															<div class="checkbox" style="padding-top: 10px;padding-bottom: 5px;">
									                            <input id="cts_table_checkedAll" class="magic-checkbox" type="checkbox">
									                            <label for="cts_table_checkedAll">选中当前全部数据，共<span id="total-num"></span>条记录</label>
									                        </div>
	<!-- 													<form id="search_form" class="form-inline"> -->
	<!-- 														&nbsp;111 -->
	<!-- 													</form> -->
													</div>
													<table id="cts_sync_jira_table" class="table">
				                                      <thead>
												        <tr>
												            <th data-field="" data-checkbox="true"></th>
												            <th data-field="name">用例名称</th>
												            <th data-field="state" data-formatter="stateFormatter">状态</th>
												            <th data-field="jiraCaseKey" >jira用例key</th>
												            <th data-field="areaName" >区域</th>
												            <th data-field="priority" >优先级</th>
												            <th data-field="iterationName" >迭代</th>
												            <th data-field="authorNm" >创建人</th>
												            <th data-field="assignNm" >指派人</th>
												            <th data-field="creationTs" data-formatter="timeFormatter">创建时间</th>
												        </tr>
												    </thead>
				                                  </table>
			                                   </div>
										</div>
									</div>
								</div>
							</div>

							<div class="pull-right pad-rgt mar-btm" >
								<button type="button" class="previous btn btn-primary">上一步</button>
								<button type="button" class="next btn btn-primary">下一步</button>
								<button type="button" class="finish btn btn-success" disabled onclick="syncData.syncJiraOrCts();">同步</button>
								<button type="button" class="btn btn-gray"  onclick="syncData.closeLayer();">取消</button>
							</div>
						</form>
				</div>


		</div>
</div>
	<jsp:include page="../common/framework/script.jsp" />
	<script src="${pageContext.request.contextPath}/static/js/common/bootdatatable.init.js"></script>
	<script src="${pageContext.request.contextPath}/static/plugin/bootstrap-table/bootstrap-table.min.js"></script>
	<script src="${pageContext.request.contextPath}/static/plugin/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
	<script src="${pageContext.request.contextPath}/static/js/common/jquery.bootstrap.wizard.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/testCase/syncData.js"></script>
    <script type="text/javascript">
  //定义判断同步形式的全局变量
    var syncFlag = "jira_sync_cts";
  //定义存储jira和cts项目加载生成的optionHtml的全局变量
    var jiraProjectOntion = "";
    var ctsProjectOntion = "";
    //定义当前选中的jira和cts项目id
    var projectKey = "";
    var jiraProjectId = "";
  //定义是否为初始化加载表格（0：初始化表格；1：刷新表格）
    var initTableFlag = 0;
    //定义jira_sync_cts_table表格查询条件的全局变量
    var status = "";
    var reporter = "";
    var componentForSelect = "";
    var cycleIdAndVersionId = "";
    var sortColumn = "";
	var sort = "";
	//定义cts_sync_jira_table表格查询条件的全局变量
    var state = "";
	var iterationId = "";
	var areaId = "";
	var authorId = "";
	var assignId = "";

	//定义jira_sync_cts的同步事件参数变量
	var jira_flag =1;
	var jira_issueIds = "";
	var ctsProjectId = "";
	var jira_syncParam = "";
	var jira_priorityJson = {};
	var jira_stateJson = {};
	//定义cts_sync_jira的同步事件参数变量
	var cts_flag = 1;
	var cts_testcaseIds = "";
	var cts_syncParam = "";
	var cts_priorityJson = {};
	var cts_stateJson = {};
	//初始化jira和cts项目列表
	syncData.getJiraProject();
	syncData.getCtsProject();
	//项目左侧下拉框change事件
	$("#jiraOrCts_project0").change(function(){
		  if(syncFlag == "jira_sync_cts"){
			  projectKey = $('#jiraOrCts_project0 option:selected').attr('key');
			  jiraProjectId = $('#jiraOrCts_project0 option:selected').val();
		  }else if(syncFlag == "cts_sync_jira"){
			  ctsProjectId = $('#jiraOrCts_project0 option:selected').val();
		  }
	});
	//项目右侧左侧下拉框change事件
	$("#jiraOrCts_project1").change(function(){
		 if(syncFlag == "cts_sync_jira"){
			 projectKey = $('#jiraOrCts_project1 option:selected').attr('key');
			 jiraProjectId = $('#jiraOrCts_project1 option:selected').val();
		  }else if(syncFlag == "jira_sync_cts"){
			  ctsProjectId = $('#jiraOrCts_project1 option:selected').val();
		  }
	});

	//jira_table选中当前所有数据触发事件
	$('#jira_table_checkedAll').click(function(){
		 if(document.getElementById("jira_table_checkedAll").checked){
            $('#jira_sync_cts_table').bootstrapTable('checkAll');
        }else{
        	$('#jira_sync_cts_table').bootstrapTable('uncheckAll');
        }
	});

	//cts_table选中当前所有数据触发事件
	$('#cts_table_checkedAll').click(function(){
		 if(document.getElementById("cts_table_checkedAll").checked){
            $('#cts_sync_jira_table').bootstrapTable('checkAll');
        }else{
        	$('#cts_sync_jira_table').bootstrapTable('uncheckAll');
        }
	});

	//测试循环Formatter方法
	function cycleListFormatter(value,row,index){
		var cycleNames = "";
		$(value).each(function(index,data){
			cycleNames += cycleNames==""?"":",";
			cycleNames += data.cycleName;
		});
		return cycleNames;
	}

	//模块Formatter方法
	function componentListFormatter(value,row,index){
		var componentNames = "";
		$(value).each(function(index,data){
			componentNames += componentNames==""?"":",";
			componentNames += data.name;
		});
		return componentNames;
	}
	//创建时间Formatter方法
	function timeFormatter(value,row,index){
		var time = new Date(value).Format("yyyy-MM-dd hh:mm");
		return time;
	}

	//状态列格式转换
	function stateFormatter(value,row,index){
		var stateName = '';
		if(value == 1){
			stateName = "就绪";
		}else if(value == 2){
			stateName = "设计";
		}else if(value == 3){
			stateName = "已关闭";
		}
		return stateName;
	}



	//转换时间至指定格式显示
	Date.prototype.Format = function (fmt) { // author: meizz
	    var o = {
	        "M+": this.getMonth() + 1, // 月份
	        "d+": this.getDate(), // 日
	        "h+": this.getHours(), // 小时
	        "m+": this.getMinutes(), // 分
	        "s+": this.getSeconds(), // 秒
	        "q+": Math.floor((this.getMonth() + 3) / 3), // 季度
	        "S": this.getMilliseconds() // 毫秒
	    };
	    if (/(y+)/.test(fmt))
	        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
	    for (var k in o)
	        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
	            return fmt;
	}


    </script>
<jsp:include page="../common/framework/footer.jsp" />